This invention relates to cryptography systems. More particularly, this invention relates to a computer implemented architecture for performing cryptographic primitives including encrypting, decrypting, signing and verifying/ authenticating functions.
Cryptography is the an and science of keeping messages secure from eavesdroppers and adversaries. Historically, valuable messages were kept secure by personal envoys who hand carried sensitive information from a sending party to a receiving party. While useful in its time, this protection method is not very practical in a modem world where information flows freely and changes rapidly.
In more recent history, with the advent of computers, wireless communication, and other technological advances, information can be exchanged very quickly among many different individuals who were often spread all over the world. To provide a secure interchange of information in the electronic arena, one traditional approach to mitigating the risk of having sensitive information intercepted was to institute proprietary computerized systems that were closed to the general public. Such proprietary systems promoted security simply by restricting physical access through high security protocols. A private communication network linked only those terminals that were authorized, and only participants to the system with the appropriate security clearance were permitted access to the terminals. Hence, participants and information were authenticated by definition, and the integrity and value of the information were preserved within the confines of the closed processing system. Unfortunately, proprietary systems are not useful in a grander context which envisions the interchange of information among virtually any individuals without limitation.
Cryptography has evolved in the electronic setting as a means to securely transfer information over a communication system that is presumed to be insecure, like the telephone lines or a public communications network (e.g., the Internet). In this electronic computerized context, cryptography provides the necessary tools to digitally secure sensitive and valuable electronic messages in a manner that insures privacy between the authenticate sender and authenticate recipient of the communiquxc3xa9, even though the message is subject to interception on the insecure communication system.
Before sending an electronic message, the sender encrypts it. xe2x80x9cEncryptionxe2x80x9d transforms the message from its plaintext into some meaningless ciphertext that is not understandable in its raw form and cannot be deciphered by an eavesdropper. To ensure the recipient that the true sender originated the message, and not some impostor, the sender xe2x80x9cdigitally signsxe2x80x9d the message with its own unique digital signature. The signed encrypted message is then transmitted over the insecure network to the intended recipient. The recipient receives and decrypts the encrypted message. xe2x80x9cDecryptionxe2x80x9d transforms the message from its ciphertext back to its plaintext. Only the recipient is presumed to have the ability to decipher the message. The recipient also xe2x80x9cverifiesxe2x80x9d the authenticity of the digital signature to assure itself that the contents are from the legitimate sender and have not been subsequently altered.
Encryption, decryption, digital signing, and verification are principal cryptographic primitives that are used in an electronic network setting to facilitate the security, privacy, authenticity, and integrity of information being exchanged. These cryptographic primitives commonly involve the use of secret cryptographic keys. xe2x80x9cKeysxe2x80x9d are a numerical value, often expressed digitally as a number of bits, which are used in the cryptographic algorithms that encrypt and decrypt messages. The keys are uniquely associated with a particular identity, such as a person, group, physical object, business, or institution. The keys are kept secret and used selectively by the identity to perform the cryptographic primitives as required. For example, a person might use a key to encrypt and sign a purchase order message intended for a merchant. The merchant might then use a key to decrypt the message and verify the authenticity of the signature.
In a network setting, it is desirable to locate cryptographic functions in the computer operating system so that they are available to other applications executing on the computer. Furthermore, it is desirable to define an application program interface (API) which allows the applications access to the cryptographic functions in a standardized way.
A cryptographic API raises a number of important security issues. Cryptographic functions, such as encryption and signing, can be performed using a number of different algorithms and formats. Security can vary widely among the different approaches. A single module of the operating system cannot possibly implement all possible algorithms and formats that a user or application might want to use in a given situation.
On the other hand, cryptographic functionality involves the handling of sensitive information and the maintenance of secure keys. It would be advantageous for a user or application to be able to trust the cryptographic system on the same level that an operating system is typically trusted.
There are also potential hazards of using cryptographic functions in the computerized network setting. Since the functions are carried out electronically, the user might assume the cryptographic routines are operating as expected, yet not be aware of ignorant or sophisticated electronic attacks. Careless applications might use cryptographic encryption or signature keys in ways that jeopardize the keys"" secrecy. Moreover, malicious applications might even deliberately compromise the user""s secrecy, or worse, perform unauthorized cryptographic operations. For instance, a malicious application might attempt to decrypt the user""s secret files and transmit them to some adverse party. Another situation might involve an application attempting to digitally sign notes or IOUs on behalf of the user without the user""s knowledge or consent. A computer implemented cryptographic system must therefore provide the needed security to prevent attack from poorly devised or malicious applications.
Today, there are several electronic systems that provide cryptographic services in the computer forum. These include xe2x80x9cBsafe librariesxe2x80x9d by RSA Data Security Inc., xe2x80x9cX/Open CAPIxe2x80x9d, and xe2x80x9cPKCS#xe2x80x9d. However, each of these systems permit direct access of the application to keying material. There is no protection of these cryptographic resources from electronic attack. Furthermore, the Bsafe system, which is the most widely used cryptography system, directly attaches the cryptographic code to the application. There is no contemplation of protecting the cryptographic functions within the computer from ignorant or malicious attacks from other software applications.
It would therefore be advantageous to provide a computer implemented architecture for performing cryptographic primitives that maintains and protects the user""s keys and prevents undesired access and use of cryptographic functions without authorization from the user.
This invention provides a cryptographic system and method that protect a user""s keys and prevents undesired access and use of crytographic functions without authorization from the user. The cryptographic system is a unique tri-layer architecture. It includes a cryptographic application program interface (CAPI) which provides functionality to an application, one or more cryptographic service providers (CSPs) which implement the functionality presented by the CAPI to the application, and one or more private application program interfaces (PAPI) which allow the CSPs to communicate directly with a user.
The CAPI layer provides the interface with an application that requests cryptographic functions such as encryption, decryption, signing, or verification. The CAPI selects the appropriate CSP for performing the requested cryptographic function. The CSPs perform the cryptography functions and manage the cryptographic keys used in the functions. For instance, one or more CSPs might be configured to perform the encryption function using certain types of cryptographic algorithms and keys; one or more different CSPs might be configured to decrypt the messages; another CSP might be embodied to digitally sign messages; while still another CSP might be designed to verify signatures and messages. Preferably, the CSPs are implemented as dynamic linked libraries (DLLs) that are loaded on demand by the CAPI, and which can then be called by the application through the CAPI.
The CAPI also authenticates the chosen CSP. Each CSP has a digital signature of a trusted authority which can be authenticated by the CAPI to ensure that impostor CSPs are not introduced to the system.
To promote security, the application is restricted from direct access to the cryptographic keys maintained in the CSPs, but is permitted to manipulate the keys through the use of handles assigned by the CSPs. Cryptographic keys used in the encryption and decryption are not exported from the CSPs in their raw form, but only in an encrypted form. Moreover, certain confidential private keys are not permitted to leave the CSPs under any circumstances. In this manner, the CSPs protect the keys from compromise, while simultaneously offering a full range of cryptographic functionality that the user/application requests.
The PAPI keeps the user informed as to the functions being performed by the CSPs. The PAPI provides the user with direct access to the CSP, independent of the application. The PAPI can present information to the user that the user may not trust the application to provide. For instance, the CSP can present through the PAPI an explanation of the transaction being conducted by the CSP. The CAPI might also present a dialog box asking for the user""s confirmation each time an application requests a digital signature to enable the user to confirm or reject digitally signing the message. The PAPI might also be configured to notify the user and seek permission to export certain cryptographic keys.
This system architecture can be advantageously adapted to many different environments. By implementing the cryptographic services as independent and separate CSPs that are only accessible through a CAPI layer, the architecture affords maximum protection of sensitive cryptographic keys. Additionally, by implementing the CSPs as DLLs, the cryptographic functions themselves and the associated security levels can be easily modified or replaced without affecting the higher level application. This is useful for rapid conformation to acceptable and changing regulatory and legal practices imposed by various governments. Finally, by providing the PAPI layer, the architecture protects the user from malicious applications that attempt to expose key information or gain unauthorized signatures of the user.